package com.foreknow.demo9;

public class CImpl extends D implements C{

    @Override
    public void eat() {
        System.out.println("eat.......");
    }

    @Override
    public void sleep() {
        System.out.println("sleep------------");
    }

    @Override
    public void study() {
        System.out.println("study------------");

    }

    public static void main(String[] args) {
        C c= new CImpl();
//        A a = new AImpl();//父类的引用指向子类的对象
        c.eat();
        c.study();
        c.sleep();
    }

    @Override
    public void game() {
        System.out.println("game--------------");
    }
}
